:root {
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    /* fix: 在部分系统上，背景颜色一直为暗色，无法从暗色切换到亮色。 */
    /* color-scheme: light dark; */

    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;

    --titlebar-height: 35px;
}

body {
    margin: 0;
    width: 100% !important;
}

html {
    height: 100%;
    overflow: hidden;
}

/* 重写一些elementplus的样式 */

.el-drawer__footer {
    height: 30px;
}

.el-textarea__inner {
    height: 100%;
}

.el-card__body {
    padding: 10px;
}

.el-col {
    text-align: center;
}

.el-text {
    display: flex;
    align-items: center;
    text-align: center;
}

.el-drawer__header {
    margin-bottom: 0px;
}

:deep(.el-table__header) {
    width: 100% !important;
}

:deep(.el-table__body) {
    width: 100% !important;
}

/* 全局调整图片预览组件样式 */
.el-image-viewer__canvas {
    .el-image-viewer__img {
        max-height: calc(100% - 200px) !important;
    }
}

.el-tree {
    height: 100%;
}

.iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.el-tabs--border-card {
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.el-segmented {
    --el-border-radius-base: 8px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header span {
    font-weight: bold;
}

.log-textarea {
    background-color: black;
    color: rgb(255, 255, 255);
    height: 100%;
    /* 设置 textarea 高度为父元素高度 */
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    overflow-x: auto;
    padding: 2px;
}

.log-info {
    color: #518be1;
}

.log-warning {
    color: #ff8800;
}

.log-error {
    color: #ff0000;
}

.log-debug {
    color: #57b435;
}

.log-success {
    color: #00ff00;
}

.pretty-response {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    overflow-x: auto;
    max-height: 60vh;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--response-bg-color);
    flex: 1;
    padding: 1em;
}

.console-log {
    height: 25px;
    background-color: #f2f3f5;
    position: absolute;
    width: 100%;
    bottom: 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

/* 设置align-right的元素内容右对齐 */
.align-right .el-form-item__content {
    display: flex;
    justify-content: flex-end;
}


.position-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.vertical-center {
    display: flex;
    justify-content: center;
}

.editor-tabs .el-tabs__item {
    position: relative;
    display: inline-block;
    max-width: 300px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 26px !important;
    /* 给关闭按钮预留空间 */
}

.editor-tabs .el-tabs__item .el-icon {
    position: absolute !important;
    top: 13px !important;
    right: 7px !important;
}

.editor-tabs .el-tabs__nav {
    line-height: 40px;
}

.keyword-search .el-table__row:hover {
    cursor: pointer;
}

/* 仪表盘进度条样式 */

.percentage-value {
    display: block;
    margin-top: 10px;
    font-size: 28px;
}

.percentage-label {
    display: block;
    margin-top: 10px;
    font-size: 12px;
}

/* 网站扫描风险等级颜色 */

.risk-level-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.risk-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
}

.risk-badge-critical {
    background-color: #931024;
    color: white;
}

.risk-badge-red {
    background-color: rgb(247, 65, 65);
    color: white;
}

.risk-badge-yellow {
    background-color: #e6a23c;
    color: white;
}

.risk-badge-green {
    background-color: #73a8ed;
    color: white;
}

.risk-badge-gray {
    background-color: #909399;
    color: white;
}


.drawer-title {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.drawer-title img {
    width: 18px;
    height: 18px;
    margin-right: 2px;
}


.finger-container {
    flex-wrap: wrap;
    display: flex;
    gap: 7px;
}

.demo-tabs .custom-tabs-label .el-icon {
    vertical-align: middle;
}

.demo-tabs .custom-tabs-label span {
    vertical-align: middle;
    margin-left: 4px;
}

.select-tips {
    float: right;
    color: var(--el-text-color-secondary);
    font-size: 13px;
}

.form-item-not-fill {
    flex-direction: column;
    display: flex;
}

.form-item-tips {
    color: var(--el-text-color-secondary);
    font-size: 13px;
}

/* 文字超出换行且包括识别回车符号 */

.all-break {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* 文本域容器 */

.textarea-container {
    position: relative;
    width: 100%;
}

.action-area {
    position: absolute;
    bottom: 10px;
    right: 17px;
    display: flex;
    gap: 5px;
}

/* hljs */

pre code.hljs {
    display: block;
    overflow-x: auto;
    padding: 1em;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    border-radius: 5px;
    /* border: 1px solid #ccc; */
    max-height: 80vh;
}

code.hljs {
    padding: 3px 5px
}

/* 自定义一些类似 tailwindscss 命名的样式 */

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.w-1\/2  {
    width: 50%;
}

.w-1\/3  {
    width: 33.333%;
}

.w-1\/4  {
    width: 25%;
}

.w-2\/3  {
    width: 66.666%;
}

.w-3\/4  {
    width: 75%;
}

.float-left {
    float: left;
}

.float-right {
    float: right;
}

.align-middle {
    vertical-align: middle;
}

.font-bold {
    font-weight: bold;
}

.font-small {
    font-weight: small;
}

/* gap 后面的值为 n*4px */
.gap-2 {
    gap: 8px;
}

.mb-10px {
    margin-bottom: 10px;
}

.mt-10px {
    margin-top: 10px;
}

.ml-10px {
    margin-left: 10px;
}

.mt-5px {
    margin-top: 5px;
}

.ml-5px {
    margin-left: 5px;
}

.mr-5px {
    margin-right: 5px;
}

.mr-10px {
    margin-right: 10px;
}

.mb-5px {
    margin-bottom: 5px;
}

.my-5px {
    margin-block: 5px;
}

.mx-5px {
    margin-inline: 5px;
}

.w-40\% {
    width: 40%;
}

